<style type="text/css">
    @media (max-width: 375px) {
        .edit-form tr td input {
            width: 100%;
        }

        .edit-form tr th:first-child, .edit-form tr td:first-child {
            width: 20%;
        }

        .edit-form tr th:nth-last-of-type(-n+2), .edit-form tr td:nth-last-of-type(-n+2) {
            display: none;
        }
    }

    .edit-form table > tbody > tr td a.btn-delcfg {
        visibility: hidden;
    }

    .edit-form table > tbody > tr:hover td a.btn-delcfg {
        visibility: visible;
    }

    @media (max-width: 767px) {
        .edit-form table tr th:nth-last-child(-n + 2), .edit-form table tr td:nth-last-child(-n + 2) {
            display: none;
        }
        .edit-form table tr td .msg-box {
            display: none;
        }
    }
</style>
<div class="panel panel-default panel-intro">
    <div id="source" class="panel-heading">
        {:build_heading(null, false)}
        <ul class="nav nav-tabs">
            <li class="active"><a href="#a1" data-toggle="tab">路印健康</a></li>
            <li ><a href="#a2" data-toggle="tab">健康俱乐部</a></li>
            <li ><a href="#a3" data-toggle="tab">会员规则说明</a></li>
            <li ><a href="#a4" data-toggle="tab">关注我们</a></li>
            <li ><a href="#a5" data-toggle="tab">邀请好友背景图</a></li>
        </ul>
    </div>

    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <!--@formatter:off-->

                <div class="widget-body no-padding">
                    <form id="a1-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('home.set/edit')}">
                        <table class="table table-striped">
                            <!--<thead>-->
                            <!--<tr>-->
                                <!--&lt;!&ndash;<th width="15%">{:__('Title')}</th>&ndash;&gt;-->
                                <!--&lt;!&ndash;<th width="68%">{:__('Value')}</th>&ndash;&gt;-->
                                <!--&lt;!&ndash;<th width="15%">{:__('Name')}</th>&ndash;&gt;-->
                                <!--&lt;!&ndash;<th width="2%"></th>&ndash;&gt;-->
                            <!--</tr>-->
                            <!--</thead>-->
                            <tbody>
                            <tr>
                                <td>图片</td>
                                <td>
                                    <div class="row">
                                        <div class="col-xs-12 col-sm-8">
                                            <div class="input-group">
                                                <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
                                                <div class="input-group-addon no-border no-padding">
                                                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                                </div>
                                                <span class="msg-box n-right" for="c-image"></span>
                                            </div>
                                            <ul class="row list-inline faupload-preview" id="p-image"></ul>
                                        </div>
                                    </div>

                                </td>
                            </tr>

                            <tr>
                                <td>路印健康简介</td>
                                <td>
                                    <div class="row">
                                        <div class="col-xs-12 col-sm-8">
                                            <textarea data-rule="required" name="row[msg]" rows="10" cols="67">{$row.msg|htmlentities}</textarea>
                                        </div>
                                        <div class="col-sm-4"></div>
                                    </div>

                                </td>
                            </tr>

                            <tr>
                                <td>联系电话</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <input type="text" name="row[phone]" value="{$row.phone|htmlentities}" class="form-control" data-tip="">
                                        </div>
                                        <div class="col-sm-4"></div>
                                    </div>

                                </td>
                            </tr>

                            <tr>
                                <td>联系地址</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <input id="address" type="text" name="row[address]" value="{$row.address|htmlentities}" class="form-control" data-tip="">
                                        </div>
                                        <div class="col-sm-4">
                                            <button type="button" id="fachoose-1" class="btn btn-primary" data-toggle="addresspicker" data-input-id="address" data-lat-id="latitude" data-lng-id="longitude"> {:__('点击选择获取地址获取经纬度')}</button>
                                        </div>
                                    </div>

                                </td>
                            </tr>

                            <tr>
                                <td>经度</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <input type="text" id="longitude" name="row[longitude]" value="{$row.longitude|htmlentities}" class="form-control" data-tip="">
                                        </div>
                                        <div class="col-sm-4"></div>
                                    </div>

                                </td>
                            </tr>

                            <tr>
                                <td>纬度</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <input type="text" id="latitude" name="row[latitude]" value="{$row.latitude|htmlentities}" class="form-control" data-tip="">
                                        </div>
                                        <div class="col-sm-4"></div>
                                    </div>

                                </td>
                            </tr>

                            </tbody>
                            <tfoot>
                            <tr>
                                <td></td>
                                <td>
                                    <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
                                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                </td>
                                <td></td>
                                <td></td>
                            </tr>
                            </tfoot>
                        </table>
                    </form>

                    <form id="a2-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('home.set/edits')}">
                        <table class="table table-striped">
                            <!--<thead>-->
                            <!--<tr>-->
                            <!--&lt;!&ndash;<th width="15%">{:__('Title')}</th>&ndash;&gt;-->
                            <!--&lt;!&ndash;<th width="68%">{:__('Value')}</th>&ndash;&gt;-->
                            <!--&lt;!&ndash;<th width="15%">{:__('Name')}</th>&ndash;&gt;-->
                            <!--&lt;!&ndash;<th width="2%"></th>&ndash;&gt;-->
                            <!--</tr>-->
                            <!--</thead>-->
                            <tbody>

                            <tr>
                                <td>内容详情</td>
                                <td>
                                    <textarea id="a-content1" class="form-control editor" rows="5" name="row[contents]" cols="50">{$row.contents|htmlentities}</textarea>

                                </td>
                            </tr>

                            </tbody>
                            <tfoot>
                            <tr>
                                <td></td>
                                <td>
                                    <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
                                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                </td>
                                <td></td>
                                <td></td>
                            </tr>
                            </tfoot>
                        </table>
                    </form>

                    <form id="a3-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('home.set/editss')}">
                        <table class="table table-striped">
                            <!--<thead>-->
                            <!--<tr>-->
                            <!--&lt;!&ndash;<th width="15%">{:__('Title')}</th>&ndash;&gt;-->
                            <!--&lt;!&ndash;<th width="68%">{:__('Value')}</th>&ndash;&gt;-->
                            <!--&lt;!&ndash;<th width="15%">{:__('Name')}</th>&ndash;&gt;-->
                            <!--&lt;!&ndash;<th width="2%"></th>&ndash;&gt;-->
                            <!--</tr>-->
                            <!--</thead>-->
                            <tbody>

                            <tr>
                                <td>会员规则说明</td>
                                <td>
                                    <textarea id="a-contents" class="form-control editor" rows="5" name="row[vip_content]" cols="50">{$row.vip_content|htmlentities}</textarea>

                                </td>
                            </tr>

                            </tbody>
                            <tfoot>
                            <tr>
                                <td></td>
                                <td>
                                    <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
                                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                </td>
                                <td></td>
                                <td></td>
                            </tr>
                            </tfoot>
                        </table>
                    </form>

                    <form id="a4-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('home.set/editsss')}">
                        <table class="table table-striped">
                            <!--<thead>-->
                            <!--<tr>-->
                            <!--&lt;!&ndash;<th width="15%">{:__('Title')}</th>&ndash;&gt;-->
                            <!--&lt;!&ndash;<th width="68%">{:__('Value')}</th>&ndash;&gt;-->
                            <!--&lt;!&ndash;<th width="15%">{:__('Name')}</th>&ndash;&gt;-->
                            <!--&lt;!&ndash;<th width="2%"></th>&ndash;&gt;-->
                            <!--</tr>-->
                            <!--</thead>-->
                            <tbody>

                            <tr>
                                <td>二维码</td>
                                <td>
                                    <div class="row">
                                        <div class="col-xs-12 col-sm-8">
                                            <div class="input-group">
                                                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
                                                <div class="input-group-addon no-border no-padding">
                                                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                                </div>
                                                <span class="msg-box n-right" for="c-images"></span>
                                            </div>
                                            <ul class="row list-inline faupload-preview" id="p-images"></ul>
                                        </div>
                                    </div>

                                </td>
                            </tr>

                            <tr>
                                <td>背景图</td>
                                <td>
                                    <div class="row">
                                        <div class="col-xs-12 col-sm-8">
                                            <div class="input-group">
                                                <input id="c-imagebj" class="form-control" size="50" name="row[imagebj]" type="text" value="{$row.imagebj|htmlentities}">
                                                <div class="input-group-addon no-border no-padding">
                                                    <span><button type="button" id="faupload-imagebj" class="btn btn-danger faupload" data-input-id="c-imagebj" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-imagebj"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                                    <span><button type="button" id="fachoose-imagebj" class="btn btn-primary fachoose" data-input-id="c-imagebj" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                                </div>
                                                <span class="msg-box n-right" for="c-imagebj"></span>
                                            </div>
                                            <ul class="row list-inline faupload-preview" id="p-imagebj"></ul>
                                        </div>
                                    </div>

                                </td>
                            </tr>

                            </tbody>
                            <tfoot>
                            <tr>
                                <td></td>
                                <td>
                                    <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
                                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                </td>
                                <td></td>
                                <td></td>
                            </tr>
                            </tfoot>
                        </table>
                    </form>

                    <form id="a5-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('home.set/editssss')}">
                        <table class="table table-striped">
                            <!--<thead>-->
                            <!--<tr>-->
                            <!--&lt;!&ndash;<th width="15%">{:__('Title')}</th>&ndash;&gt;-->
                            <!--&lt;!&ndash;<th width="68%">{:__('Value')}</th>&ndash;&gt;-->
                            <!--&lt;!&ndash;<th width="15%">{:__('Name')}</th>&ndash;&gt;-->
                            <!--&lt;!&ndash;<th width="2%"></th>&ndash;&gt;-->
                            <!--</tr>-->
                            <!--</thead>-->
                            <tbody>

                            <tr>
                                <td></td>
                                <td>
                                    <div class="row">
                                        <div class="col-xs-12 col-sm-8">
                                            <div class="input-group">
                                                <input id="c-imagess" class="form-control" size="50" name="row[imagess]" type="text" value="{$row.imagess|htmlentities}">
                                                <div class="input-group-addon no-border no-padding">
                                                    <span><button type="button" id="faupload-imagess" class="btn btn-danger faupload" data-input-id="c-imagess" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-imagess"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                                    <span><button type="button" id="fachoose-imagess" class="btn btn-primary fachoose" data-input-id="c-imagess" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                                </div>
                                                <span class="msg-box n-right" for="c-imagess"></span>
                                            </div>
                                            <ul class="row list-inline faupload-preview" id="p-imagess"></ul>
                                        </div>
                                    </div>

                                </td>
                            </tr>

                            </tbody>
                            <tfoot>
                            <tr>
                                <td></td>
                                <td>
                                    <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
                                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                </td>
                                <td></td>
                                <td></td>
                            </tr>
                            </tfoot>
                        </table>
                    </form>
                </div>
            <!--@formatter:on-->
        </div>
    </div>
</div>
<script src="/assets/img/jquery-3.4.1.min.js"></script>
<script>
    $('#a1-form').show();
    $('#a2-form').hide();
    $('#a3-form').hide();
    $('#a4-form').hide();
    $('#a4-form').hide();
    $('#a5-form').hide();

    $(document).on("click", "#source li a", function(){
        let str = $(this).attr('href')
        //console.log(str)

        if(str == '#a1'){
            $('#a1-form').show();
            $('#a2-form').hide();
            $('#a3-form').hide();
            $('#a4-form').hide();
            $('#a5-form').hide();

        }else if(str == '#a2'){
            $('#a2-form').show();
            $('#a1-form').hide();
            $('#a3-form').hide();
            $('#a4-form').hide();
            $('#a5-form').hide();
        }else if(str == '#a3'){
            $('#a3-form').show();
            $('#a1-form').hide();
            $('#a2-form').hide();
            $('#a4-form').hide();
            $('#a5-form').hide();
        }else if(str == '#a4'){
            $('#a4-form').show();
            $('#a1-form').hide();
            $('#a2-form').hide();
            $('#a3-form').hide();
            $('#a5-form').hide();
        }else if(str == '#a5'){
            $('#a5-form').show();
            $('#a1-form').hide();
            $('#a2-form').hide();
            $('#a3-form').hide();
            $('#a4-form').hide();
        }

    });
</script>
